from utils.api import API
from django.conf.urls import url
from question.forms import *
from question.views import views_admin,views_info

baseUrl = "/api/question/"

addQuestionAPI = API(AddQuestionForm, method='POST', moduleUrl='raise/', urlPrefix=baseUrl)
getQuestionListAPI = API(GetQuestionListForm, method='POST', moduleUrl='list/', urlPrefix=baseUrl)
questionOptionAPI = API(QuestionOptionForm, method='POST', moduleUrl='option/', urlPrefix=baseUrl)
questionScreenAPI = API(QuestionScreenForm, method='POST', moduleUrl='screen/', urlPrefix=baseUrl)
questionAnnounceAPI = API(QuestionAnnounceForm, method='POST', moduleUrl='onequestion/', urlPrefix=baseUrl)

urlpatterns = [
    url(addQuestionAPI.moduleUrl, views_admin.addQuestion),
    url(getQuestionListAPI.moduleUrl, views_info.getQuestionList),
    url(questionOptionAPI.moduleUrl, views_admin.questionOption),
    url(questionScreenAPI.moduleUrl, views_info.questionScreen),
    url(questionAnnounceAPI.moduleUrl, views_info.questionAnnounce),
]